package com.vim.modules.mall.service.remote;

import com.vim.modules.mall.model.base.CommonPage;
import com.vim.modules.mall.model.base.MallResponseEntity;
import com.vim.modules.mall.model.mallMember.MallMember;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @作者 Administrator
 * @时间 2020-09-10 10:40
 * @版本 1.0
 * @说明
 */
@Service
@FeignClient(name = "web-gateway", contextId = "remoteMallMemberService", fallback = RemoteMallMemberServiceFallBack.class)
public interface RemoteMallMemberService {

    /**
     * 获取会员列表
     * @param pageNo 当前页码
     * @param pageSize 每页数量
     */
    @GetMapping("/adminApi/member/memberList")
    MallResponseEntity<CommonPage<MallMember>> memberList(
            @RequestParam(value = "memberName",required = false) String memberName,
            @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo,
            @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize
    );

}
